/*****************************************************************
 Naicigam Engine v0.1

 File: VertexBuffer.h
 Created: 01/03/08
*****************************************************************/

//----------------------------------------------------------------
#ifndef INDEX_BUFFER_H
#define INDEX_BUFFER_H
//----------------------------------------------------------------
#include "system/System.h"
#include <windows.h>
#include <d3d9.h>
#include <assert.h>
#include <vector>
//---------------------------------------------------------------
using namespace std;
//---------------------------------------------------------------
namespace leo
{
//---------------------------------------------------------------
//---------------------------------------------------------------

class IndexBuffer
{
public:
	DECLARE_SMART_POINTER(IndexBuffer);

	IndexBuffer (unsigned int _count);

	unsigned int GetId() const;

	void SetIndex(short _index, short _v);
	short GetIndex(short _index) const;
	size_t GetIndexCount() const;
	
	const short* GetIndexPtr () const;
	short* GetIndexPtr ();

private:

	std::vector<short> indices;
	
	unsigned int id;
	static unsigned int currentId;
};
//----------------------------------------------------------------
#include "IndexBuffer.inl"
//----------------------------------------------------------------
} // end namespace
//----------------------------------------------------------------
#endif // _VS_INDEX_BUFFER_H_
//----------------------------------------------------------------